package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BywTalentBillingDetailsMapper;
import com.ruoyi.system.domain.BywTalentBillingDetails;
import com.ruoyi.system.service.IBywTalentBillingDetailsService;

/**
 * 达人结算Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-24
 */
@Service
public class BywTalentBillingDetailsServiceImpl implements IBywTalentBillingDetailsService 
{
    @Autowired
    private BywTalentBillingDetailsMapper bywTalentBillingDetailsMapper;

    /**
     * 查询达人结算
     * 
     * @param id 达人结算主键
     * @return 达人结算
     */
    @Override
    public BywTalentBillingDetails selectBywTalentBillingDetailsById(Long id)
    {
        return bywTalentBillingDetailsMapper.selectBywTalentBillingDetailsById(id);
    }

    /**
     * 查询达人结算列表
     * 
     * @param bywTalentBillingDetails 达人结算
     * @return 达人结算
     */
    @Override
    public List<BywTalentBillingDetails> selectBywTalentBillingDetailsList(BywTalentBillingDetails bywTalentBillingDetails)
    {
        return bywTalentBillingDetailsMapper.selectBywTalentBillingDetailsList(bywTalentBillingDetails);
    }

    /**
     * 新增达人结算
     * 
     * @param bywTalentBillingDetails 达人结算
     * @return 结果
     */
    @Override
    public int insertBywTalentBillingDetails(BywTalentBillingDetails bywTalentBillingDetails)
    {
        bywTalentBillingDetails.setCreateTime(DateUtils.getNowDate());
        return bywTalentBillingDetailsMapper.insertBywTalentBillingDetails(bywTalentBillingDetails);
    }

    /**
     * 修改达人结算
     * 
     * @param bywTalentBillingDetails 达人结算
     * @return 结果
     */
    @Override
    public int updateBywTalentBillingDetails(BywTalentBillingDetails bywTalentBillingDetails)
    {
        bywTalentBillingDetails.setUpdateTime(DateUtils.getNowDate());
        return bywTalentBillingDetailsMapper.updateBywTalentBillingDetails(bywTalentBillingDetails);
    }

    /**
     * 批量删除达人结算
     * 
     * @param ids 需要删除的达人结算主键
     * @return 结果
     */
    @Override
    public int deleteBywTalentBillingDetailsByIds(Long[] ids)
    {
        return bywTalentBillingDetailsMapper.deleteBywTalentBillingDetailsByIds(ids);
    }

    /**
     * 删除达人结算信息
     * 
     * @param id 达人结算主键
     * @return 结果
     */
    @Override
    public int deleteBywTalentBillingDetailsById(Long id)
    {
        return bywTalentBillingDetailsMapper.deleteBywTalentBillingDetailsById(id);
    }
}
